package com.coffee.sku.service.sku.dao;

import com.coffee.sku.api.sku.query.RecommendSkuQuery;
import com.coffee.sku.api.sku.req.MerchantSkuListReq;
import com.coffee.sku.api.sku.req.SkuListReq;
import com.coffee.sku.api.sku.result.MerchantSkuListResult;
import com.coffee.sku.api.sku.result.SkuListResult;
import com.coffee.sku.service.sku.bean.RecommendSku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RecommendSkuDao {
    public RecommendSku findById(Integer id);

    public RecommendSku findByIdForUpdate(Integer id);

    public List<RecommendSku> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") RecommendSkuQuery param);

    public Integer skuCount(@Param("param") SkuListReq param);

    public List<RecommendSku> page(@Param("param") RecommendSkuQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<SkuListResult> list(@Param("param") SkuListReq param);



    public RecommendSku findFirst(@Param("param") RecommendSkuQuery param);

    public Integer insert(RecommendSku param);

    Integer insertBatch(List<RecommendSku> list);

    public void updateById(@Param("param") RecommendSku param);

    public Integer deleteById(Integer id);

    public Integer deleteBySkuId(Integer skuId);

    public Integer deleteBySkuIds(@Param("list") List<Integer> idList,@Param("cityId") Integer cityId);

    public List<Integer> findSkuIds(@Param("cityId") Integer cityId);

    public List<MerchantSkuListResult> merchantSkuList(@Param("param") MerchantSkuListReq param);
}